import 'package:basic_common/app_theme.dart';
import 'package:basic_common/common_exports.dart';
import 'package:basic_widgets/image_widget.dart';
Widget buildItem(
    {required String attrName, required String value, bool isHead = false}) {
  return Container(
    width: ScreenHelper.screenWidth,
    height: ScreenHelper.height(50),
    decoration: BoxDecoration(
      color: Colors.white,
    ),
    padding: EdgeInsets.symmetric(
        horizontal: ScreenHelper.width(10), vertical: ScreenHelper.height(2)),
    child: Row(
      mainAxisAlignment: MainAxisAlignment.start,
      children: [
        Container(
          width: ScreenHelper.width(90),
          child: Text(
            attrName,
            style: TextStyle(
                color: AppTheme.weakTextColor, fontSize: ScreenHelper.sp(16)),
          ),
        ),
        SizedBox(
          width: ScreenHelper.width(20),
        ),
        isHead
            ? circleImg(head: value, raduis: 20)
            : Expanded(
                child: Text(
                  value,
                  softWrap: true,
                  maxLines: 2,
                  style: TextStyle(
                      color: AppTheme.dartTextColor,
                      fontSize: ScreenHelper.sp(14)),
                ),
              )
      ],
    ),
  );
}
